package com.experiment.springbootconfig;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;
import java.util.Objects;

@SuppressWarnings("unused")
public class InitCommandLineRunner implements CommandLineRunner{
    Environment environment;

    public InitCommandLineRunner(Environment environment){
        this.environment=environment;
    }

    @Override
    public void run(String... args){
        System.out.println("The random number is ".concat(Objects.requireNonNull(environment.getProperty("random."))));
    }

}
